[Core] Linter rule for service_name.json#3186
Merged
qwordy merged 14 commits intoAzure:masterfrom Apr 19, 2021
Merged
Conversation
This was referenced Mar 29, 2021
Comment on lines
+69
to
+77
| def _store_parsers(parser, parser_keys, parser_values, sub_parser_keys, sub_parser_values): | ||
| for s in parser.subparsers.values(): | ||
| parser_keys.append(_get_parser_name(s)) | ||
| parser_values.append(s) | ||
| if _is_group(s): | ||
| for c in s.choices.values(): | ||
| sub_parser_keys.append(_get_parser_name(c)) | ||
| sub_parser_values.append(c) | ||
| _store_parsers(c, parser_keys, parser_values, sub_parser_keys, sub_parser_values) |
Member
There was a problem hiding this comment.
Reuse the same function in azure-cli-core?
Member
Author
There was a problem hiding this comment.
Reuse code from azure-cli-extensions
| for help_file in help_files: | ||
| if help_file.command: | ||
| high_command_set.add(help_file.command.split()[0]) | ||
| print('high_command_set:') |
Member
There was a problem hiding this comment.
Is high command an existing term or coined by you? Is it OK to use command group to refer to the same thing?
Member
Author
There was a problem hiding this comment.
The left most word in a command, e.g., vm, disk. Let me add a comment.
fengzhou-msft
approved these changes
Apr 16, 2021
qwordy
commented
Apr 19, 2021
qwordy
commented
Apr 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check format of service_name.json. Command and AzureServiceName are required. Others are optional.
Each highest level command group should have reference in service_name.json.
It only runs on modified extensions. I have tested it with modification on extension. This PR itself will not modify any extension.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update
src/index.jsonautomatically.The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify
src/index.json.